package com.bidepan;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//类注解，组件扫描时将注解类加载到内存实例化为bean
public class TestUser {
    @Test
    public void test() {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        User user = context.getBean("user2", User.class);
        System.out.println(user);
    }
}
